<template>
	<view class="inputCode">
		<headerTar title="手动输入" :isBack="false">
		</headerTar>
		<view class="box">
			<u-input v-model="value" placeholder="请输入设备编码" :focus="true" height="20rpx" clearable="true"
				class="input" />
			<view class="sure" @click="sure">
				确认
			</view>
		</view>
	</view>
</template>

<script>
	import headerTar from '@/components/headerTar/header'
	export default {
		components: {
			headerTar
		},
		data() {
			return {
				value: '',
				type: 'text',
				border: true
			}
		},
		methods: {
			sure() {
				if (!this.value) {
					return this.$toast.error('请输入设备码~')
				}
				uni.navigateTo({
					url: '/pages/scanCodeDetail/scanCodeDetail?deviceNo=' + JSON.stringify(this.value)
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.inputCode {
		width: 100vw;
		box-sizing: border-box;


		.box {
			padding: 60rpx;
			padding-top: 150rpx;
		}

		.input {
			margin-bottom: 50rpx;
		}

		.sure {
			margin-top: 80rpx;
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			border-radius: 40rpx;
			background-color: #33c666;
			color: #fff;
			text-align: center;
		}

	}
</style>